package com.jk.service.wh;

import com.jk.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "provider-data")
public interface MovieApi {

    @GetMapping("movie/queryMovie")
    List<MovieBean> queryMovie(@SpringQueryMap MovieBean movie);

    //查询正在热映的电影
    @GetMapping("movie/getRadientMovie")
    List<MovieBean> getRadientMovie();

    //查询待上映的电影
    @RequestMapping("movie/waitMovie")
    List<MovieBean> waitMovie();

    //查询最受期待电影前10
    @RequestMapping("movie/expectMovie")
    List<MovieBean> expectMovie();

    //查询前10的高评分电影
    @RequestMapping("movie/getScore")
    List<MovieBean> getScore();

    /*
     * @Author: xz
     * @Description: 查询已上映的总条数
     * @Date: 2021/5/24 9:56
     * @Param:
     * @Return:
     **/
    @RequestMapping("movie/getMovieCount")
    Integer getMovieCount();
    /*
     * @Author: xz
     * @Description: 查询待上映的总条数
     * @Date: 2021/5/24 9:56
     * @Param:
     * @Return:
     **/
    @RequestMapping("movie/getMovieCount2")
    Integer getMovieCount2();


    @RequestMapping("movie/getCarousel")
    List<CarouselBean> getCarousel();
    /*
     * @Author: xz
     * @Description: 查询类型表
     * @Date: 2021/5/25 15:49
     * @Param:
     * @Return:
     **/
    @RequestMapping("movie/getType")
    List<MovieTypeBean> getType();


    @RequestMapping("movie/saveRedis")
    void saveRedis(OrderBean order);

    @RequestMapping("movie/getMovieCountByStatus")
    Integer getMovieCountByStatus(@RequestParam String movieName);
    //查询热播电影
    @RequestMapping("movie/queryHitTv")
    List<MovieBean> queryHitTv(MovieBean mm);
    //获取票房排行前五名
    @RequestMapping("movie/getMoney")
    List<MovieBean> getMoney();
    //删除redis 存入mongodb
    @RequestMapping("movie/saveOrder")
    void saveOrder(OrderBean order);
    //查询影院
    @RequestMapping("movie/queryCinemaAll")
    List<CinemaBean> queryCinemaAll(@SpringQueryMap CinemaBean cc);
    //根据id查询影院
    @RequestMapping("movie/buyTicketById")
    CinemaBean buyTicketById(@RequestParam Integer cinemaId);
    //根据影院id查询影院对应的电影
    @RequestMapping("movie/queryMovieAllById")
    List<MovieBean> queryMovieAllById(@RequestParam  Integer cinemaId);
    //根据影院id 电影id查看观影时间
    @RequestMapping("movie/getMovieCinemaById")
    List<MovieBean> getMovieCinemaById(@RequestParam Integer cinemaId, @RequestParam Integer movieId,@RequestParam String date);
    //根据影院id 电影id查询影院对应的电影
    @RequestMapping("movie/getMovies2")
    MovieBean getMovies2(@RequestParam Integer cinemaId,@RequestParam Integer movieId);
    // 动态查询排片时间
    @RequestMapping("movie/getDate")
    List<ProgramBean> getDate(@RequestParam Integer cinemaId,@RequestParam Integer movieId);
    //获取影院
    @RequestMapping("movie/getCinema")
    List<CinemaBean> getCinema();
    //获取西安市的区
    @RequestMapping("movie/getAddressById")
    List<AddressBean> getAddressById();
    //查询影厅
    @RequestMapping("movie/getHall")
    List<MovieHallBean> getHall();
}
